package org.example.service;

import org.example.entity.auth.Account;
import org.example.mapper.UserMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

/**
 * 权限校验服务
 */
@Service
public interface AuthorizeService extends UserDetailsService {
    /**
     * 发送邮箱
     * @param email
     * @return
     */
    String sendValitateEmail(String email,String sessionId,boolean hasAccount);

    String validateAndRegister(String username, String password, String email, String code,String sessionId);

    String validateOnly(String email,String code,String sessionId);

    boolean resetPassword(String email,String password);
}
